// 版权归Epic Games, Inc.所有。保留所有权利。

#pragma once

#include "Engine/DataAsset.h"

#include "LyraAimSensitivityData.generated.h"

#define UE_API LYRAGAME_API

enum class ELyraGamepadSensitivity : uint8;

class UObject;

/** 定义一组游戏手柄灵敏度到浮点数值的映射。 */
UCLASS(MinimalAPI, BlueprintType, Const, Meta = (DisplayName = "Lyra Aim Sensitivity Data", ShortTooltip = "数据资产，用于定义游戏手柄灵敏度到浮点数值的映射。"))
class ULyraAimSensitivityData : public UPrimaryDataAsset
{
	GENERATED_BODY()

public:
	UE_API ULyraAimSensitivityData(const FObjectInitializer& ObjectInitializer);
	
	/**
	 * 将灵敏度枚举转换为浮点数值
	 * @param InSensitivity 输入的灵敏度枚举值
	 * @return 对应的浮点数灵敏度值，如果未找到则返回1.0f
	 */
	UE_API const float SensitivtyEnumToFloat(const ELyraGamepadSensitivity InSensitivity) const;
	
protected:
	/** 灵敏度设置到对应浮点数的映射 */
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TMap<ELyraGamepadSensitivity, float> SensitivityMap; // 存储灵敏度枚举与浮点数值的映射关系
};

#undef UE_API